<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <button id="btn">button</button>
    <script>

        // 标准事件（处理函数）绑定
        const btn = document.getElementById('btn');

        btn.addEventListener('click', function () {
            console.log(1);
        }, {
            once: true,
        })

        btn.addEventListener('click', function () {
            console.log(2);
        }, {
            once: true,
        })


    </script>
</body>

</html>